﻿@model BlackBird.Models.AllProjectsDM
@using BlackBird.Models
@using BlackBird.Resources

@{
    ViewBag.Title = @BBStrings.ProjectView;
}

@section title_toolbar
{

    <nav>
        <ul id="button_command">
            <li><a class="newproject">@BBStrings.NewProject</a></li>
            @if (ViewData["IsEnableToCreateBijiadan"].ToString().Equals("True", StringComparison.OrdinalIgnoreCase))
            {
                <li><a class="newbijiadan">@BBStrings.CreateBiJiaDan</a></li>
            }

            @* template comment out those function.
            <li><a class="newincome" data-type="@SupportTypes.Income">@BBStrings.RecordShouRu</a></li>
            <li><a class="newexpend" data-type="@SupportTypes.Expend">@BBStrings.RecordZhiChu</a></li>
            <li><a class="projectplan">@BBStrings.ProjectPlan</a></li>
            *@
            <li><a class="projectContract">@BBStrings.ProjectContract</a></li>
            <li><a class="contractSample">@BBStrings.HeTongSample</a></li>
            @if (ViewData["IsEnableToCreateFuKuandan"].ToString().Equals("True", StringComparison.OrdinalIgnoreCase))
            {
            <li><a class="fukuandan">@BBStrings.CreateFuKuanDan</a></li>
            }
            
            <li><a class="changepassword">@BBStrings.ModifyPassword</a></li>
        </ul>
    </nav>
}

@if (Model.MessageDM.AllMessageItem.Count > 0)
{
<div id = "message_popup_pannel">
    @{Html.RenderPartial(MVC.Shared.Views.Util.MessagePopup, Model.MessageDM);}
</div>
}

<div id = "Project_main_body" style="width: 1200px;">

   @foreach (var project in Model.AllProjects)
    {
        <div>
            @{Html.RenderPartial(MVC.Shared.Views.Project.ProjectViewItem,project);}
        </div>
    }

</div>